from flask import Flask, session,current_app
from flask_script import Manager
from info import create_app,db
import logging
from flask_migrate import Migrate,MigrateCommand


# 调用工厂方法，传入不同的配置获取不同app对象
app = create_app('development')

# 7.创建manage管理类
manager = Manager(app)

# 8.创建数据库迁移对象
Migrate(app,db)
# 9.添加迁移指令到manager对象中
manager.add_command('db',MigrateCommand)

# 数据库迁移命令行




if __name__ =='__main__':
    manager.run()
